<template>
  <div class="home">
    <van-nav-bar :title="meta.title" />
    <van-button type="primary" @click="test">URL 跳转</van-button>
    <HelloWorld msg="Welcome to Your Vue.js + TypeScript App" />
  </div>
</template>

<script lang="ts">
import { Options, Vue } from 'vue-class-component'
import HelloWorld from '@/components/HelloWorld.vue' // @ is an alias to /src

@Options({
  components: {
    HelloWorld
  }
})
export default class Home extends Vue {
  created() {
    console.log('----')
  }
  test() {
    console.log(this)
    this.$api({
      url: '/api/users/lceric/followers',
      params: {
        owner: 'kkl-fe',
        repo: 'live-dev-server',
        username: 'lceric'
      },
      method: 'get'
    })
  }
}
</script>
